package com.softer.wxzj.mapper;

import com.softer.wxzj.entity.FlowConfig;
import com.softer.wxzj.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * RoleMapper class
 * @author zcz
 * @date 2019/1/16
 */
@Mapper
@Repository
public interface FlowConfigMapper extends BaseMapper {
    /**
     * 根据类型查询count
     * @param flowType
     * @return
     */
    int getCountByFlowType(String flowType);
    /**
     * 检查是否符合新增、更新条件
     * @param flowConfig
     * @return
     */
    int isQualifiedCheck(FlowConfig flowConfig);

    /**
     * 根据类型和步数查询当前角色
     * @param flowType
     * @param flowStep
     * @return
     */
    String getRoleCodeByTypeAndStep(@Param("flowType")String flowType,@Param("flowStep")String flowStep);

}
